package design.patterns.templatemethod;

/**
 * @Desc:   模板方法模式客户端案例
 * @author: cww
 * @DateTime: 2020-06-11 22:18
 */

public class MainTest {
    private static Account acct = null;

    public static void main(String[] args) {
        acct = new MoneyMarketAccount();
        System.out.println("Interest earned from Money Market account = " + acct.calculateInterest());

        acct = new CDAccount();

        System.out.println("Interest earned from CD account = " + acct.calculateInterest());

    }
}
